package com.zhongshan.ga.mobile.resource;

import java.io.IOException;

import org.restlet.representation.Representation;
import org.restlet.representation.StringRepresentation;
import org.restlet.resource.Get;
import org.restlet.resource.Post;
import org.restlet.resource.ServerResource;

import com.google.gson.JsonObject;
import com.zhongshan.ga.logger.GenerateLog;
import com.zhongshan.ga.mobile.logic.GetScenicSpotsIntroduceLogic;
import com.zhongshan.ga.mobile.logic.GetScenicSpotsMapLogic;

/**
 * 获得景点地图位置手机端接口
 * @author yanqi
 *
 */
public class GetScenicSpotsMapResource extends ServerResource {
	@Get
	public Representation getScenicSpotsMap(Representation entity)throws IOException {
		GenerateLog.outDebug("调用了获得景点介绍的方法");
		entity = post(entity);
		return entity;
	}
	
	@Post
	public Representation postScenicSpotsMap(Representation entity)throws IOException {
		GenerateLog.outDebug("请求获得景点信息的post方法" + entity);
		
		JsonObject resultJsonObject = new GetScenicSpotsMapLogic().getScenicSpotsMap(entity);
		GenerateLog.outDebug(resultJsonObject + "=======================================");
		Representation representation = new StringRepresentation(resultJsonObject.toString());
		return representation;
	}
}
